﻿using Models;
using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace Server.Models
{
    public class DatabaseInitializer : DropCreateDatabaseIfModelChanges<DatabaseContext>
    {
        protected override void Seed(DatabaseContext context)
        {
            context.TaiXe.Add(new TaiXe() { Ten = "Van Cong Tuan", ViDo = 11, KinhDo = 106, SoBinhChon = 0, SoChoNgoi = 4, SoXe = "61A8976" });
            context.TaiXe.Add(new TaiXe() { Ten = "Luu Quang Vu", ViDo = 11.5, KinhDo = 110.669, SoBinhChon = 0, SoChoNgoi = 4, SoXe = "61A8977" });
            context.TaiXe.Add(new TaiXe() { Ten = "Cao Minh Vinh", ViDo = 11.053, KinhDo = 106.969, SoBinhChon = 0, SoChoNgoi = 4, SoXe = "61A8978" });
            context.TaiXe.Add(new TaiXe() { Ten = "Binh", ViDo = 11.053, KinhDo = 106.61, SoBinhChon = 0, SoChoNgoi = 4, SoXe = "61A8979" });
            context.TaiXe.Add(new TaiXe() { Ten = "Nguyen Trung Tuan", ViDo = 11.023, KinhDo = 106.669, SoBinhChon = 0, SoChoNgoi = 4, SoXe = "61A8975" });
            context.TaiXe.Add(new TaiXe() { Ten = "Nguyen Van Tuan", ViDo = 11.063, KinhDo = 106.669, SoBinhChon = 0, SoChoNgoi = 4, SoXe = "61A8972" });
            context.SaveChanges();
        }
    }
}